/**
 * 
 */
package com.ctn.task.condition.impl;

import java.util.Date;

/**
 * 基于时间的任务执行
 * @author Zale
 *
 */
public class TimeCondition extends BaseCondition{
	private static final long serialVersionUID = -91063145846827876L;
	private Date startTime;
	
	public TimeCondition() {
		super();
	}

	public TimeCondition(Date startTime) {
		super();
		this.startTime = startTime;
	}


	@Override
	protected boolean checkCondition() {
		boolean result = false;
		if (startTime != null) {
			Date now = new Date();
			if (now.after(startTime)) {
				result = true;
			}
		}
		return result;
	}

}
